import http from '../../utils/request'
import type { NavInfo, queryNavInfo } from '../ApiType/navType'
/**
 * @description 添加导航
 * @param data
 */
export function addNav(data: NavInfo) {
  return http.post('/api/addNav', data)
}
/**
 * @description 编辑导航
 * @param data
 */
export function editNav(data: NavInfo) {
  return http.post('/api/editNav', data)
}
/**
 * @description 查询所有导航列表 
 * @param data  page 页码  pageSize  页面条数
 */
export function queryNavList(data: queryNavInfo) {
  return http.get('/api/queryNavList', data)
}
/**
 * @description 查询导航详情
 * @param data id  导航唯一标识
 */
export function queryNavDetail(id: string) {
  return http.post(`/api/navDetail?id=${id}`)
}

/**
 * @description 删除导航
 * @param data id  导航唯一标识
 */
export function deleteNav(id: string) {
  return http.delete(`/api/deleteNav/${id}`)
}